home *** CD-ROM | disk | FTP | other *** search
/ C/C++ Users Group Library 1996 July / C-C++ Users Group Library July 1996.iso / vol_100 / 144_01 / select.hlp < prev    next >
Text File  |  1985-08-19  |  3KB  |  60 lines

  1. **********************************************************************
  2. *                             SELECT                                 *
  3. **********************************************************************
  4. *                  COPYRIGHT 1983 EUGENE H. MALLORY                  *
  5. **********************************************************************
  6. PROGRAM:
  7.     SELECT - Select lines from a file based on a pattern search.
  8. USAGE:
  9.     SELECT [<fid] pattern [-X] [-N] [-A] [-B] [-H] [>fid]
  10. FUNCTION:
  11.     This searches the input for the supplied pattern and outputs
  12.     the selected lines. The default is to output lines with the 
  13.     pattern.  Other selection options are:
  14.     
  15.     -X    Select lines without the pattern.
  16.     -A    Select lines including and after finding the pattern.
  17.     -B    Select lines before the pattern is found.
  18.     -N  Number selected lines with input line number.
  19.     -H  Display the available options and metacharacters.
  20.     
  21.     Only one selection option may be used.
  22.     
  23.     The pattern is very general.  There are the following options.
  24.     
  25.     *    Any number of any characters, from 0 to 132.
  26.     ?    Any single character.
  27.     _    A space character.
  28.     \    Literal character.  Used to include *, ? etc. in pattern.
  29.     {    Beginning of line.
  30.     }    End of line.
  31.     @    Any alphabetic character.
  32.     #    Any number.
  33.     !    NOT  This may be used with any printable character, _,
  34.         {, }, @, and #, as well as \char forms.  This can be used 
  35.         to find    strings NOT at the beginnnin# or end of a line.
  36. EXAMPLE:
  37.     SELECT <PROG.C !;}          {Finds lines which don't end in ;}
  38.     SELECT <TEXT {} -X >NEWTEXT {Removes empty lines}
  39.     SELECT <PROGRAM.PRN ERROR   {Lists all lines containing "ERROR".}
  40. COMMENTS:
  41.     Because CP/M CCP converts all arguments to uppercase,
  42.     this program does all its compares in uppercase.  "abc" will
  43.     match "ABC" in all cases.
  44.  
  45.         Command Line                       
  46.  
  47. ___________________________________  
  48.                                   |  
  49.                                   |  
  50.                                   |  PATTERN
  51.                                   |  
  52.                                   |                  
  53.                     ______________V______________    
  54.  Standard Input     |                           |   Standard Output
  55.      TEXT           |                           |    SELECTED TEXT
  56. ------------------->|          SELECT           |----------------------->
  57.                     |                           |
  58.                     |                           |
  59.                     |___________________________|
  60.